package cn.chf.cloud.config;

import io.swagger.v3.oas.models.ExternalDocumentation;
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Info;
import org.springdoc.core.models.GroupedOpenApi;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author chenhf
 * &#064;date  2025-03-21 13:40
 */
@Configuration
public class Swagger3Config {
    @Bean
    public GroupedOpenApi payApi() {
        return GroupedOpenApi.builder()
                .group("订单微服务模块").pathsToMatch("/consumer/pay/**").build();
    }
    @Bean
    public OpenAPI docOpenApi(){
        return new OpenAPI()
                .info(new Info().title("cloud2025")
                        .description("通用设计REST")
                        .version("v1.0.0"))
                .externalDocs(new ExternalDocumentation()
                       .description("www.chf.cn")
                        .url("https://yiyan.baidu.com"));
    }

}
